<style>
td {
	border-bottom:#13B1E4 1px solid;
	border-right:#13B1E4 1px solid;}

</style>


<script type="text/javascript">

function doDelete(url)
{
	var a = confirm('Are you sure?');
	if(a)
	{
		window.location = url;
	}
}
</script>
<!-- CONTENT START -->
<div id="content">

<!-- LEFT START -->
<?php
include ('themes/'.$this -> theme.'/left.php');
?>
<!-- LEFT END -->

<!-- RIGHT START -->
<div id="right">

<h2 class="right_heading">Email Template Manager</h2>
<div id="shop_anounce">
<a href="?page=emailTemplates">
<button>Add New Email Template</button></a><br />
<?= $this -> renderStatus($cmd)?>

<table width="650" border="0">
  <tr>
    <td bgcolor="#CCCCCC">Name</td>
    <!--<td bgcolor="#CCCCCC">Upload Image</td>-->
    <!--<td bgcolor="#CCCCCC">Matrix Area</td>-->
    <td bgcolor="#CCCCCC">Edit/View</td>
    <td bgcolor="#CCCCCC">Delete/View</td>
  </tr>
  <?php
  foreach($arrEmailTemplates as $emailTemplates):  
  $urlDelete = "?page=emailTemplateManager&sub=doDelete&id=$emailTemplates[templateID]";
  $urlEdit = "?page=emailTemplates&sub=update&id=$emailTemplates[templateID]";
  ?>
  <tr>
  	<td><?= $emailTemplates['templateName']; ?></td>
    <td><a href="<?= $urlEdit?>"><img src="iconset/pencil_16.png" alt="Edit" border="0" /></a></td>
    <td><img src="iconset/delete_16.png" alt="Delete" 
    onclick="doDelete('<?= $urlDelete?>')" /></td>
  </tr>
  <?php
  endforeach;
  ?>
</table>

</div>
</div>
<!-- RIGHT END -->

<!-- Just to increase height automatically --><div id="height_increaser"></div>

</div>
<!-- CONTENT END -->
<div id="content_end"></div>